using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Clinica.Generales;
using PQT_Personal;

namespace Clinica
{
    public partial class frmMain : Form
    {
        private int childFormNumber = 0;

        private ctrlfrmMain _ctrlPantalla;

        public ctrlfrmMain CtrlPantalla
        {
            get {
                if (_ctrlPantalla == null) { _ctrlPantalla = new ctrlfrmMain(this); }
                return _ctrlPantalla; }
            set { _ctrlPantalla = value; }
        }

        public frmMain()
        {
            InitializeComponent();
        }
              

        //private void OpenFile(object sender, EventArgs e)
        //{
        //    OpenFileDialog openFileDialog = new OpenFileDialog();
        //    openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
        //    openFileDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*";
        //    if (openFileDialog.ShowDialog(this) == DialogResult.OK)
        //    {
        //        string FileName = openFileDialog.FileName;
        //        // TODO: Add code here to open the file.
        //    }
        //}
      

        private void ExitToolsStripMenuItem_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }               
              
        private void mnuCerrar_Click(object sender, EventArgs e)
        {
            foreach (Form childForm in this.MdiChildren)
            {
                childForm.Close();
            }
        }

        private void mnuAcercaDe_Click(object sender, EventArgs e)
        {
            frmAcercaDe frm = new frmAcercaDe();
            frm.ShowDialog();        
        }

        private void frmMain_Load(object sender, EventArgs e)
        {
            
        }

        private void mnuPersonal_Click(object sender, EventArgs e)
        {
            frmAdministrativos frm = new frmAdministrativos();
            frm.Show();
        }

        private void mnuIniciarSesion_Click(object sender, EventArgs e)
        {
            if (CtrlPantalla.iniciarSesion())
            {
                if (true)
                {
                    
                }
            }
        }
    }
}
